package com.lagou.sqlsession;

import com.lagou.pojo.Configuration;

/**
 * @description: 创建sqlSessionFactory对象:  工厂类:用来生产sqlSession对象实现增删改查
 * @author oyz
 * @date 2022/10/16 9:05
 * @version 1.0
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
